import httpRequest from '@/utils/hqqtRequest'

enum API {
    // 一级/二级/三级分类数据
    C1_ARR_URL = '/admin/product/getCategory1',
    C2_ARR_URL = '/admin/product/getCategory2/',
    C3_ARR_URL = '/admin/product/getCategory3/',
    // 获取平台属性
    ALL_ARR_URL = '/admin/product/attrInfoList/'
}

export const getC1API = () => httpRequest({ url: API.C1_ARR_URL })

export const getC2API = (c1Id: number | string) => httpRequest({ url: API.C2_ARR_URL + c1Id })

export const getC3API = (c2Id: number | string) => httpRequest({ url: API.C3_ARR_URL + c2Id })

export const getAttrInfoListAPI = (c1Id: number | string,c2Id: number | string,c3Id: number | string) => httpRequest({ url: API.ALL_ARR_URL + `${c1Id}/${c2Id}/${c3Id}` })
